Species turnover in ant assemblages is greater horizontally than vertically in the world's tallest tropical forest

Abstract Abiotic and biotic factors structure species assembly in ecosystems both horizontally and vertically. However, the way community composition changes along comparable horizontal and vertical distances in complex three‐dimensional habitats, and the factors driving these patterns, remains poorly understood. By sampling ant assemblages at comparable vertical and horizontal spatial scales in a tropical rainforest, we tested hypotheses that predicted differences in vertical and horizontal turnover explained by different drivers in vertical and horizontal space. These drivers included environmental filtering, such as microclimate (temperature, humidity, and photosynthetic photon flux density) and microhabitat connectivity (leaf area), which are structured differently across vertical and horizontal space. We found that both ant abundance and richness decreased significantly with increasing vertical height. Although the dissimilarity between ant assemblages increased with vertical distance, indicating a clear distance‐decay pattern, the dissimilarity was higher horizontally where it appeared independent of distance. The pronounced horizontal and vertical structuring of ant assemblages across short distances is likely explained by a combination of microclimate and microhabitat connectivity. Our results demonstrate the importance of considering three‐dimensional spatial variation in local assemblages and reveal how highly diverse communities can be supported by complex habitats.


| INTRODUC TI ON
Vertical stratification has long been recognized as one of the key ecological mechanisms in structuring species distributions and diversity patterns (MacArthur & MacArthur, 1961). Habitats with high vertical complexity, such as forests, often house more species than habitats with low structural complexity (Oliveira & Scheffers, 2019).
Vertical stratification of communities has been documented for a range of habitats, from the deep ocean to tropical forest, and is largely driven by variation in abiotic conditions and resources (Jorda et al., 2020;Sheehan et al., 2019;Venegas-Li et al., 2018). For example, in pelagic ecosystems, temperature changes are one of the main drivers that induce vertical stratification (Li et al., 2020), whereas in terrestrial ecosystems the heterogeneity in vegetation structure across different heights can be important (Jarron et al., 2020).
Although the effects of horizontal distance on species turnover have been examined at large spatial scales (kilometers ;Chesters et al., 2019), it is often considered to be negligible at small scales (metres), and therefore has rarely been incorporated into studies on vertical stratification patterns (Roisin et al., 2006;Weiss et al., 2016).
However, in complex ecosystems with high three-dimensional structural heterogeneity, such as coral reefs and tropical rainforests, abiotic and biotic factors can vary greatly both horizontally and vertically across short distances (Reaka-Kudla, 1997), driving smallscale variation in community composition (Davies & Asner, 2014).
Although numerous studies investigate species diversity changes across horizontal and vertical dimensions, few assess both simultaneously at comparable spatial scales (Wermelinger et al., 2007).
Tropical rainforests are considered the most structurally complex and biologically diverse terrestrial habitat on Earth (Ehrlich & Wilson, 1991) because vegetation complexity, light intensity, temperature, and humidity generate substantial microclimatic and structural variability (Nakamura et al., 2017;Parker, 1995;Scheffers et al., 2013Scheffers et al., , 2017. With increasing height, air temperature tends to increase while relative humidity tends to decrease with the interaction between solar radiation and canopy buffering (Scheffers et al., 2013). This often leads to the vertical migration of species during transitions between dry and wet seasons (Basham & Scheffers, 2020). Horizontally, microclimate often varies more between open forest gaps and shaded closed canopy forests (Fetcher et al., 1985;Parker, 1995;Scheffers et al., 2017) than between ground and canopy surface. For example, maximum air temperature can vary up to 2.2°C vertically (Scheffers et al., 2013), while differs by 8°C between gaps and closed canopy over similar scales (metres; Brown, 1993;Kaspari et al., 2015;Stark et al., 2017). Finally, microhabitat structure, especially connectivity, can play an important role in shaping community composition in rainforest (Adams et al., 2019;Beaulieu et al., 2010;Ramette & Tiedje, 2007). In many habitats, inter-arboreal connectivity is low, and this limits horizontal movement for nonflying arboreal organisms . In the rainforest, connecting physical structures (e.g., lianas) are common, and they facilitate movement, thereby increasing connectivity and decreasing turnover of nonflying arboreal organisms Adams et al., 2019;Bélisle, 2005). There are other characteristics that affect faunal turnover in rainforests, e.g., plant composition and nutrient distribution (Vieira & Monteiro-Filho, 2003), but the influence of these characteristics is likely context specific.
Those studies that do consider community composition both horizontally and vertically in tropical rainforests, find patterns that are idiosyncratic and taxon-dependent (Antoniazzi et al., 2021;Basham et al., 2018). The relevant scale of turnover can depend on behavioral, morphological, and physiological traits of organisms interacting with habitat variability (Soininen et al., 2018). For amphibians in Madagascar, distance-decay occurs in the canopy and understory but not on the ground, most simply explained by limited canopy connectivity (Basham et al., 2018). Conversely, for ants in secondary forests in Mexico, distance-decay occurs in ground assemblages but not in canopy assemblages, which may result from the easier movement by smaller animals combined with larger territories of canopy ants, and higher microhabitat heterogeneity at the ground level (Antoniazzi et al., 2021). Basset et al. (2015) revealed that the composition turnover was structured by vertical, horizontal, and seasonal dimensions but is more similar within the horizontal dimension. Nevertheless, how assemblage turnover within rainforest fauna varies at comparable horizontal and vertical distances remains largely unknown (Dial, Bloodworth, et al., 2004;Nakamura et al., 2017), partly due to the technical challenges in conducting sampling across replicated horizontal positions for a range of vertical heights (Dial, Bloodworth, et al., 2004).
Tropical arboreal ants are abundant and ecologically important, offering an ideal study system for examining spatial turnover in tropical forest canopies (Yusah et al., 2018). The distribution and activity of ants in tropical forests are sensitive to microclimate (Kaspari, 1993;Perfecto & Vandermeer, 1996), which can vary greatly both vertically and horizontally. Key food resources such as carbohydrates and protein for ants change with height in the canopy (Kaspari & Yanoviak, 2001), suggesting rapid ant community turnover vertically. A large-scale experiment demonstrates that the species richness, composition, and beta diversity of ants change after lianas are removed (Adams et al., 2019), suggesting that high connectivity reduces horizontal turnover.
Using canopy traverse techniques (Dial et al., 2006;Dial, Sillett, et al., 2004), we mapped arboreal ant taxa at a small spatial scale from the ground to the canopy across different horizontal positions in a tropical rainforest in Sabah, Malaysia, home to both extremely high arthropod biodiversity and the world's tallest tropical trees (Shenkin et al., 2019). We compared pairwise dissimilarity of ant assemblages across vertical and horizontal distances, microclimate, and microhabitat connectivity. Specifically, we tested two, not mutually exclusive hypotheses ( Figure 1): 1. Microclimate will generate a turnover of ant species along environmental gradients (such as light intensity, temperature, and/or humidity) at small scales both vertically and horizontally.
2. Microhabitat connectivity will reduce vertical turnover due to tree architecture (trunks) compared with horizontal turnover.

| Study area
We conducted field sampling during April and May 2002 in primary lowland dipterocarp rainforest, part of a Class I forest reserve near Danum Valley Field Centre, Sabah, Malaysian Borneo (4°57′N, 117°48′E; Dial, Sillett, et al., 2004;Dial et al., 2006; Figure 2). The mean temperature is 26.7°C ± 1.9°C, relative humidity ranges from 72% to 100% (saturation) daily, and mean annual rainfall is 2669 mm (range: 1918-3294 mm; Walsh & Newbery, 1999). Because of its equatorial position, the forest is subject to two rainy (May-June and October-January) and two dry seasons (March-April and August-September; Walsh & Newbery, 1999).
Sampling was conducted in a 160 m long × 70 m tall vertical slice of primary forest at 150 m a.s.l., spanning a small tributary stream of the Segama River ( Figure 2). The ground was relatively level within the plot, without steep hillsides or ridges (Dial, Sillett, et al., 2004).
There were 11 trees from four families with canopies in contact with the transect, with nine individuals in the Dipterocarpaceae and Fabaceae families (Dial et al., 2006). These trees ranged from 40.8 m to 75.0 m in height (see Table 1 for details of tree species) above an overstory of unidentified trees.

| Field site
The field survey consisted of several activities. First, we established the vertical sampling system in April 2002 via a 200 m long application of "canopy trekking" to access the forest trees to secure a horizontal traverse line (Dial et al., 2006;Dial, Sillett, et al., 2004). Once the 130 m traverse line was secured near the top of the three tallest trees, each >65 m above ground level, we suspended seven vertical transects ( Figure 2). We used these vertical transects to sample the canopy interior systematically from 1 m above ground to the traverse line 55-65 m above ground. Finally, we collected measures of photosynthetically active radiation instantaneous with a handheld meter, temperature, and humidity with suspended data logging sensors over 24 h, and fogging samples in May 2002 (Dial et al., 2006). were between trays at the time of fogging. A 1.6% aqueous solution of the synthetic pyrethrum (Cypermethrin) was used. Arthropods were collected into 80% ethanol 1-2 h after fogging, and ants were separated as part of arthropod ordinal sorting (see Dial et al., 2006 for results on ordinal arthropod assemblages). The ants sampled using fogging are mainly diurnal foraging species active during the sampling period (0700 to 0930), and therefore likely present a subset of the total local ant diversity.

F I G U R E 1
Predictions of how ant diversity could be influenced by microclimate and microhabitat connectivity. (a) The scenario in which microclimate is the dominant driver shaping turnover of ant assemblages across vertical and horizontal dimensions. In the vertical dimension, microclimate tends to change linearly with vertical height, resulting in a linear relationship between vertical distance and assemblage turnover. In contrast, microclimate can vary nonlinearly across horizontal space, leading to weak or no relationship between distance and turnover. (b) The simplified scenario when microhabitat connectivity dominates in shaping turnover across horizontal and vertical dimensions at small scales. Vertically, microhabitat connectivity is high regardless of distance, leaving no effect of vertical distance on turnover. Horizontally, microhabitat connectivity is low across all distances, resulting in weak or no relationship between horizontal distance and turnover. However, lower connectivity horizontally than vertically at comparable distances creates higher horizontal than vertical turnover.
All worker ants were identified as genus following were assigned using online image databases (www.antweb.org, www.antba se.net), published literature (Dorow & Kohout, 1995;Hung, 1970;Kohout, 2006a,b;Schödl, 1998), and the collections of TMF. Reproductive individuals were excluded from the data, since (i) their presence does not indicate an established colony, (ii) mating flights can confound estimates of abundance, and (iii) they can be challenging to match with workers unless entire nest series are collected. Lone major workers were also excluded for the latter reason. While all sample trays were suspended in the air at systematic, standardized horizontal and vertical positions, some trays captured no worker ants because there was only empty space with no foliage or stems between the sample tray without worker ants and the next sample tray above. In total, we obtained and identified ant assemblage samples for 61 out of 86 sampling points, with 14 samples having no ants, nine samples having been lost between sampling and analysis, and two samples in Transect 5 (two individual ants discovered) belonging to an emergent forest layer without horizontal positions for comparison.

| Microclimate and microhabitat connectivity
To quantify microclimate and habitat structure, air temperature (°C) and relative humidity (%) were measured at 0.5 h intervals F I G U R E 2 Study site and design: (a) habitat photo of the sampling plot; (b) map of Sabah with elevation gradient presented (metres above sea level); (c) the top and side view of the transect established within the forest plot (modified from Dial, Sillett, et al., 2004;Dial et al., 2006).

TA B L E 1
The species name and trait information of the 11 trees sampled that comprising the traverse We estimated one-sided total leaf area between sampling trays as a measure of microhabitat connectivity at different sampling points for transects 1 to 6 (T1-T6; Figure 2c). The leaf area within a sampling interval was calculated by multiplying the number of leaf intersections by the size of the base area of the interval, which was 1 m 2 (the area of the sample tray). We then used these data to estimate leaf area index (LAI) over vertical intervals (sampling methods described in Dial, Bloodworth, et al., 2004;Dial et al., 2006Dial et al., , 2011; estimation methods in Dial et al., 2006;Dial et al., 2011).
Conceptually, LAI refers to the number of leaf layers above the ground surface that would be pierced by a vertical line. For example, if LAI = 7, then there are, on average seven leaf layers above a random point on the ground within that height range; or 7 m 2 of leaf area per m 2 of the ground surface. We assumed (following MacArthur & Horn, 1969) that for any sample point in the canopy located at height z above the ground, the foliage density was approximately equal in all directions. Following this assumption at each height z, we systematically measured horizontal distances (d i ) with a laser range finder to the nearest canopy element (foliage and stems) in 12 uniformly distributed azimuths every 2 m vertically from the ground to the height of the horizontal traverse line supporting the vertical transect. Using the n ≤ 12 distances to foliage at each sample point, we found the mean distance (d) to foliage, doubled the mean (assuming that the observer was on the average midway between foliage elements), then inverted it to find leaf intersections per vertical meter at height z as LAI z = 1/(2d). By multiplying the LAI z by collection area (1 m 2 ) we estimated the leaf area sampled within the interval.

| Data analyses
All statistical analyses were conducted in R version 4.0.0 (R Development Core Team, 2019).

| Assessing patterns in microclimate and microhabitat connectivity
We quantified microclimate (air temperature, relative humidity, and PPFD) and microhabitat connectivity (total leaf area) along both vertical and horizontal gradients. To be consistent with the assemblage data, we calculated the mean air temperature and relative humidity at the same scale (5 m vertical intervals) at which the ants were sampled by either using the data close to the 5 m interval point or using the average between sampling points. We expect microclimate and microhabitat connectivity to vary monotonically with vertical gradients due to canopy buffering effects, but nondirectionally along horizontal ones. As such, we ran linear regression models with air temperature, relative humidity, PPFD, and leaf area as response variables against vertical height above ground as a predictor covariate and horizontal position of vertical transects as a categorical predictor variable.

| Distribution of ant assemblages along vertical and horizontal gradients
To understand how ant richness and abundance changed vertically and horizontally, we used linear regression models. The abundance To explore relationships between assemblage turnover and spatial distance, we conducted two different analyses. We calculated horizontal beta diversity by summing transect assemblage data across heights and vertical beta diversity by summing height assemblages across transects. We then calculated the pairwise assemblage dissimilarity across these summed data using the beta.
pair.abund function (for abundance-based dissimilarity) and beta.

| Correlates of habitat factors and ant assemblage composition
We conducted constrained ordinations to understand how microclimate (air temperature relative humidity, and PPFD) and microhabitat connectivity (total leaf area) affect ant assemblage composition. We first conducted Detrended Correspondence Analysis (DCA) using the decorana function in the vegan package and found a maximum axis length greater than 4 (range: 3.91-6.96) indicating that canonical correspondence analysis (CCA) constrained ordinations that assume unimodal responses of species to environmental gradients were appropriate. We then checked the collinearity among all explanatory variables using vif.cca function to reduce redundancy in the model. No strong collinearity (VIF < 10) was detected between microclimate and microhabitat variables, and so all predictors were included in the Canonical Correspondence Analysis (CCA). We then conducted CCA ordinations using cca function in the vegan package with all explanatory variables (air temperature, relative humidity, PPFD, and total leaf area). We conducted backward model selection using the ordistep function in the vegan package to identify the most significant variables affecting the assemblage composition based on permutation tests using 1000 permutations (Blanchet et al., 2008).
As the model selection process for CCA analysis requires samples with all environmental factors available, only 48 out of total 61 ant assemblages that had all environmental information available were included for this analysis.

| Distribution of ant assemblages along vertical and horizontal gradients
In We pooled data within the same transect or vertical stratum to examine distance-decay patterns between transects/strata. This showed strong effects of vertical distance on pairwise dissimilarity indexes between vertical strata (MRM analyses: coefficient = 0.007, p = .001, R 2 = .65, Figure 6). In contrast, we found no effects of horizontal distance on pairwise assemblage dissimilarity between transects (MRM analyses: coefficient = 0.0003, p = .52, R 2 = .02, Figure 6). The pairwise dissimilarity was consistently higher horizontally than vertically ( Figure 6).
By comparing the effects of vertical distance on assemblage dissimilarity within vertical transect and the effects of horizontal distance within vertical strata, we found greater small-scale pairwise dissimilarity (higher intercepts) over horizontal distance within the same vertical strata than over vertical distance within the same vertical transect (linear regression: F 1,17 = 25.93, p < .001, R 2 = .60, Table 4, Figure 7a).
However, the effects of vertical distance on pairwise dissimilarity were much stronger than that of horizontal distance, presenting a vertical distance-decay pattern within each transect (linear regression: F 1,17 = 46.45, p < .001, R 2 = .73, Tables 4 and 5, Figures 7b, 8 and 9).

| Correlates of ant assemblage composition
Results from canonical correspondence analysis (CCA) backward model selection indicated that both air temperature and relative humidity were significantly associated with ant assemblage composition, while PPFD and total leaf area were not ( Figure 10, Table 6).

| DISCUSS ION
We observed different patterns in species assemblage distribution over small-scale (tens of metres) vertical and horizontal gradients in a complex habitat. The high local diversity of arboreal ants can be explained by high environmental and habitat heterogeneity along both horizontal and vertical dimensions. We found consistently greater horizontal turnover in ant assemblages than that observed at comparable vertical distances. However, a distancedecay pattern of ant turnover was only detected vertically, but not horizontally, with the high species turnover between horizontal positions being independent of distance. The observed patterns confirmed our hypotheses that turnover is likely associated with continuous directional changes in microclimate vertically and stochastic environmental variation horizontally (Figure 1a). The higher horizontal assemblage turnover than vertical turnover at short distances is likely due to low microhabitat connectivity horizontally ( Figure 1b).
We found the spatial distribution of ant assemblages was associated with heterogeneity in air temperature and relative humidity within the three-dimensional structure of the forest.
The spatial pattern of microclimate in our study plot agrees with other studies in the tropical rainforest: air temperature increased with height above ground, while relative humidity decreased (Davis et al., 2019;De Frenne et al., 2019). Horizontal variation in microclimate was also high but without directional change, presumably relating to variation in vegetation structure within and between trees (Fetcher et al., 1985;Scheffers et al., 2017), which may explain the high turnover of ant assemblages and lack of distance-decay pattern in this dimension at the scales we sampled. Tropical arboreal ants show thermal adaptation to their vertical habitat use through their physiology (Kaspari et al., 2015), morphology (Law et al., 2020), and nesting site selection (Plowman et al., 2019). The high variance in microclimate generates diverse thermal niches for ant species with different thermal tolerances and hence can facilitate the coexistence of multiple species at small spatial scales (Lessard et al., 2009). For tiny ectotherms like ants, fine-scale environmental heterogeneity can play an important role in defining their distributions, probably due to the small foraging range and small body size of ants, and the thermal diversity of the environment (Bütikofer et al., 2020;Fayle et al., 2010;Kaspari et al., 2015;Klimes et al., 2012;Ribas & Schoereder, 2007 In addition to microclimate, biotic influences such as resource limitation and vegetation structure may also contribute to the high horizontal turnover we observed. The decline in ant richness and abundance with height in the canopy could be due to reduction in leaf area, which limits foraging range and nest site availability (Adams et al., 2019;Plowman et al., 2019). Ant assemblage composition can also be affected by vegetation structure such as tree size, number of branches, and cavity diversity (Adams et al., 2019;Plowman et al., 2019;Powell et al., 2011;Yusah & Foster, 2016).
Hence, we can expect distinct ant communities to be hosted by different individual trees and that the distance between trees per se may not drive assemblage dissimilarity alone. The lack of distance effects on high horizontal turnover arboreal ants in our study is consistent with patterns observed in the canopies of other forests for canopy ant assemblages across greater horizontal distances (100-700 m), whereas a distance-decay pattern was observed in ground ant assemblages (Antoniazzi et al., 2021).
For social insects like ants where workers are wingless, vertical movement of workers within the colony tree is likely to be less challenging than movement between trees, especially without vegetation connections such as lianas (Adams et al., 2019;Yusah & Foster, 2016), which may be less common in the Asian tropics compared with the American tropics (Dial, Bloodworth, et al., 2004).
Such a lack of connectivity between individual trees means that each tree canopy might function as an island within the forest Southwood & Kennedy, 1983 (Floren et al., 2014). This finding of a relatively large proportion of regional biodiversity being sampled from small plots within rainforests is in line with patterns for herbivorous insects F I G U R E 7 Boxplots showing the median and interquartile ranges (IQR) of the estimated very small-scale beta diversity (model intercept) and distance effects (model coefficient) on pairwise dissimilarity between sampling points within transects/strata. Model intercepts and coefficients are from the linear regressions between distance and assemblage dissimilarity within each horizontal transect and vertical stratum (see Figures 8 and 9). Whiskers denote 1.5 * IQR. Data beyond this range are plotted individually.  (Novotny et al., 2007), birds (Huang & Catterall, 2021), and butterflies (Daily & Ehrlich, 1995) and is likely driven by high structural complexity at small scales (Basset et al., 2012

| CON CLUS ION
Our study revealed high spatial variation in ant communities in both horizontal and vertical dimensions over small spatial scales. We detected a distance-decay pattern in ant assemblage composition vertically, but no effects of distance on assemblage turnover horizontally. These patterns are associated with vertical variation in air temperature and relative humidity. We found higher horizontal than the vertical turnover in ant assemblages, which may be driven by the low microhabitat connectivity. Our findings demonstrate the need to consider species turnover in both spatial dimensions. Such insights will enable us to understand the mechanisms behind species distributions, and therefore make more informed decisions about how to preserve biodiversity in these highly diverse tropical forests, which are currently threatened by anthropogenic change. writing -review and editing (equal). Roman Dial: Investigation (equal); methodology (equal); writing -review and editing (equal).

ACK N OWLED G M ENT
S.X and T.M.F were funded by the Czech Science Foundation, Czech Republic, Grant ID: 21-06446S. No authors declare any conflict of interest. We are thankful to Mr Runxi Wang for his help in figure design, analysis, and comments on the draft of the study.

CO N FLI C T O F I NTE R E S T
There is no conflict of interest among authors.